﻿<Window x:Class="WpfClient.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Menu>
			<MenuItem Header="Lesson2">
				<MenuItem Header="Save" Name="mnuSave" Click="mnuSave_Click" />
				<MenuItem Header="New order" Name="mnuNewOrder" Click="mnuNewOrder_Click" />
				<MenuItem Header="Exit" Name="mnuExit" Click="mnuExit_Click" />
			</MenuItem>
		</Menu>
		<ComboBox Grid.Row="1" Name="cmbCustomers" Margin="5" SelectionChanged="cmbCustomers_SelectionChanged" />
		<ListBox Grid.Row="2" Margin="5" Name="lstOrders">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<Border CornerRadius="5" BorderThickness="2" BorderBrush="Blue" Margin="3">
						<StackPanel Orientation="Horizontal">
							<TextBlock Text="Order #" TextAlignment="Right" Width="40"/>
							<TextBlock Name="txtOrderID" Text="{Binding Path=OrderID}" Margin="5,0,10,0" Width="30"/>
							<TextBlock Text="Order Date:" TextAlignment="Right" Width="80"/>
							<TextBlock Name="txtOrderDate" Text="{Binding Path=OrderDate,StringFormat={}{0:MM/dd/yyyy}}" Margin="5,0,10,0" Width="75"/>
							<TextBlock Text="Required Date:" TextAlignment="Right" Width="80"/>
							<TextBlock Name="txtRequiredDate" Text="{Binding Path=RequiredDate, StringFormat={}{0:MM/dd/yyyy}}"	Margin="5,0,10,0" Width="75"/>
						</StackPanel>
					</Border>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
	</Grid>
</Window>
